package com.mall.utils;

import com.mall.entity.User;

public class UserCache {

    private UserCache(){};

    private static ThreadLocal<User> LOCAL = new ThreadLocal<>();

    public static void put(User user) {
        LOCAL.set(user);
    }

    public static User get(){
        return LOCAL.get();
    }

    public static void remove() {
        LOCAL.remove();
    }

}
